<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>学科信息</title>
    <style>
        #container {
            width: 80%;
            margin: 10px auto;
        }
        #main dt {
            font-size: 1.5em;
        }
        #main dd {
            font-size: 1.2em;
        }
        #main a {
            text-decoration: none;
            color: blue;
        }
    </style>
</head>
<body>
	<div id='container'>
	<div class="user">
        {% if request.session.username %}
        {{ request.session.username }}
        <a href="/vote/logout/">注销</a>
        {% else %}
        <a href="/vote/login/">用户登录</a>&nbsp;&nbsp;
        {% endif %}
        <a href="/vote/register/">快速注册</a>
    </div>
		<h1>所有学科</h1>
		<hr>
		<div id='main'>
			{% for subject in subjects %}
			<div>
				<h3>
					<a href="/vote/teachers/?sno={{ subject.no }}">{{ subject.name }}</a>
					{% if subject.is_hot %}
					<img src="/static/images/hot.png" width="32" alt="">
					{% endif %}
				</h3>
				<p>{{ subject.intro }}</p>
			</div>
			{% endfor %}
		</div>
	</div>
</body>
</html>